package org.spider.model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 字典表
 * </p>
 *
 * @author lzy
 * @since 2022-06-20 19:04:14
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("spider_dict")
@ApiModel(value = "SpiderDictEntity对象", description = "字典表")
public class SpiderDictEntity extends Model<SpiderDictEntity> {

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("父主键")
    @TableField("dict_parent_id")
    private Long dictParentId;

    @ApiModelProperty("字典码")
    @TableField("dict_code")
    private String dictCode;

    @ApiModelProperty("字典值")
    @TableField("dict_key")
    private Integer dictKey;

    @ApiModelProperty("字典名称")
    @TableField("dict_value")
    private String dictValue;

    @ApiModelProperty("排序")
    @TableField("dict_sort")
    private Integer dictSort;

    @ApiModelProperty("字典备注")
    @TableField("dict_remark")
    private String dictRemark;

    @ApiModelProperty("字典状态，1：被禁用；2：正常使用；3：被删除")
    @TableField("dict_status")
    private Integer dictStatus;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
